 <%@ page contentType="text/html; charset=UTF-8"%>
 <%@ taglib prefix="s" uri="/struts-tags"%>
 <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
 <html>
    <head>
       <link href="
       <s:url value="resources/css/main.css"/>
       " rel="stylesheet" type="text/css"/>
    </head>
    <body>
       <center>

          <table align=center>
             <tr>
                <td>
                   <h1>
                      <s:if test="address==null || address.addressId == null">
                         <s:text name="label.address.add"/>
                      </s:if>
                      <s:else>
                         <s:text name="label.address.edit"/>
                      </s:else>
                   </h1>
                </td>
             </tr>
          </table>
          <table width=600 align=center>
             <tr>
                <td><a href="getAllAddresses.html">Click Here to View Addresses</a></td>
             </tr>
          </table>
          <table>
             <tr>
                <td align="left" style="font:bold;color:red">
                   <s:fielderror/>
                   <s:actionerror/>
                   <s:actionmessage/>
                </td>
             </tr>
          </table>
          <s:form>
             <table align="center" class="borderAll">
                <s:hidden name="criteria" value="A0"/>
                <s:hidden name="criteriaSubId" value="1"/>
                <s:hidden name="address.addressId" />
                <tr>
                   <td class="tdLabel">
                      <s:text name="label.address.street"/>
                   </td>
                   <td>
                      <s:textfield name="address.street" size="30"/>
                   </td>
                </tr>
                <tr>
                   <td class="tdLabel">
                      <s:text name="label.address.zipcode"/>
                   </td>
                   <td>
                      <s:textfield name="address.zipcode" size="5"/>
                   </td>
                </tr>
                <tr>
                   <td class="tdLabel">
                      <s:text name="label.address.addressType"/>
                   </td>
                   <td>
                      <s:select name="address.addressType" list="#session.addressTypeList" headerKey="" headerValue="Select"   />
                   </td>

                </tr>
                <tr>
                   <td class="tdLabel">
                      <s:text name="label.address.lastUpdate"/>
                   </td>
                   <td>
                        <s:textfield name="address.lastUpdate" size="10" />

                   </td>
                </tr>

             </table>
             <br/>
             <table>
                <tr>
                   <td>

                    <s:if test="address==null || address.addressId == null">
                        <s:submit action="addressInsert" key="button.label.submit" cssClass="butStnd"/>

                    </s:if>
                    <s:else>
                          <s:submit action="addressUpdate" key="button.label.submit" cssClass="butStnd"/>
                    </s:else>


                   </td>
                   <td>
                      <s:reset key="button.label.cancel" cssClass="butStnd" action="addressInsertOrUpdate" />
                   </td>
                <tr>
             </table>
          </s:form>
       </center>
    </body>
 </html>